export default {
	data() {
		return {
			statusBarHeight: 0,
			isH5: false,
			isApp: false,
		}
	},
	onLoad() {
		this.getSystemBarHeight();
	},
	methods: {
		getSystemBarHeight() {
			const systemInfo = uni.getSystemInfoSync();

			// #ifdef H5
			this.isH5 = true;
			this.statusBarHeight = 0;
			// #endif

			// #ifdef APP-PLUS
			this.isApp = true;
			this.statusBarHeight = systemInfo.statusBarHeight || 0;
			// #endif

			// #ifdef MP-WEIXIN || MP-ALIPAY
			this.statusBarHeight = systemInfo.statusBarHeight || 0;
			// #endif
		},
	}
}